import Vue from 'vue'
import VueRouter from 'vue-router'
import navButton from '../views/navButton.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'navButton',
    component: navButton,
    children:[
      {
      path: '/Home',
      name: 'Home',
      component: () => import( '../views/Home.vue')
     }, {
      path: '/type',
      name: 'type',
      component: () => import( '../views/type.vue')
     }, {
      path: '/my',
      name: 'my',
      component: () => import( '../views/my.vue')
     },
    ]
  },
  {
    path: '/cart',
    name: 'cart',
    component: () => import( '../views/cart.vue')
   },{
    path: '/mydetails',
    name: 'mydetails',
    component: () => import( '../views/mydetails.vue')
   },
  
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
